﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using mamnontuoitho7.AppCode;
using System.Data;

namespace mamnontuoitho7.module
{
    public partial class Fontend : System.Web.UI.MasterPage
    {

        private mamnontuoitho7.AppCode.Article _article = new mamnontuoitho7.AppCode.Article();
        private ImageAlbum _imageAlbum = new ImageAlbum();
        private VideoClip _videoClip = new VideoClip();
        private Album _album = new Album();

        protected DataTable _dt;
        protected DataTable _dtAlbum;
        protected DataTable _dtVideo;
        protected DataTable _dttLink;
        protected DataTable _dttArticleSubType;

        protected DataRow _dtrSchoolInfo;
        protected General _general = new General();

        private Link _link = new Link();
        private Class _school = new Class();

        protected String _onlineUsers = "";
        protected String _hits = "";

        protected void Page_Load(object sender, EventArgs e)
        {
            try{
                _dt = _article.GetSomeArticle("9");// lấy article cho muc tin mới nhất
                _dtAlbum = _album.GetSomeAlbum("12","0");
                _dtVideo = _videoClip.GetSomeVideo("5");
                _dttLink = _link.GetAllShareLink();

                _dttArticleSubType = _article.GetArticleSubType(Session["Common_articleTypeID"].ToString());
                _dtrSchoolInfo = _school.GetShoolInformation();

                _onlineUsers = Application["OnlineUsers"].ToString();
                _hits = Application["Hits"].ToString();

            }
            catch (Exception ex)
            {
                Response.Redirect(ConstantClass._errorPage);

            }
        }
        
    }
}